<!DOCTYPE html>
<html>
    <head>
        <style>
            #testBtn{
                width: 100px;
                height: 100px;
                background-color: red;
                color: white;
                text-align: center;
            }
        </style>
        <script src="./utils.js"></script>
        <script>
            var list = [{
                id: 2,
                parentId: 1
            },
        {
            id: 3,parentId: 2
        },
    {id: 4,parentId: 3}]
            var data = ()=> generateTree2(list,1)
        </script>
    </head>
    <body>
        <div class="container">
            <button type="button" id="testBtn" onclick="data()">点击</button>
        </div>
    </body>
</html>